package com.gitee.xmhzzz.component.oss;

import com.gitee.xmhzzz.component.oss.config.OssConfig;
import com.gitee.xmhzzz.component.oss.template.OssTemplate;
import com.gitee.xmhzzz.component.oss.token.OssSecurityTokenContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName OssConfiguration
 * @Description
 * @Author wzq
 * @Date 2023/7/7 14:28
 * @Version 1.0
 */

@Configuration
public class OssConfiguration {

    @Bean("ossConfig")
    public OssConfig ossConfig(){
        return new OssConfig();
    }

    @Bean("ossTemplate")
    public OssTemplate ossTemplate(OssConfig ossConfig){
        return new OssTemplate(ossConfig);
    }

    @Bean("ossSecurityTokenContext")
    public OssSecurityTokenContext ossSecurityTokenContext(OssConfig ossConfig){
        return new OssSecurityTokenContext(ossConfig);
    }
}
